home *** CD-ROM | disk | FTP | other *** search
/ Resource for Source: C/C++ / Resource for Source - C-C++.iso / misc_src / cprot20f / cprot20.h next >
Encoding:
C/C++ Source or Header  |  1995-11-01  |  3.0 KB  |  91 lines

  1. /************************************************************
  2.                Include file CProtect
  3.  
  4.                ⌐   Thomas Lichtneckert 1995
  5.                    Nordenski÷ldsgatan 24
  6.                    S-413 09 G÷teborg
  7.                    Sweden
  8.                fax:    +46 - 31 121 621
  9.                voice:  +46 - 31 145 131
  10.                email:  Thomas.Lichtneckert@abc.se
  11. ************************************************************/
  12.  
  13. #ifndef _CPROTECT_
  14. #define _CPROTECT_
  15.  
  16. #include <windows.h>
  17.  
  18. #ifndef __INTSIZE 
  19.     #if defined(__SMALL__) && __I86__ > 2
  20.         #define __INTSIZE  4
  21.     #else
  22.         #define __INTSIZE  2
  23.     #endif
  24. #endif
  25.  
  26. #if __INTSIZE == 2 
  27.     typedef    long        INT32;
  28.     typedef    unsigned long    UINT32;
  29.     typedef    short        INT16;
  30.     typedef    unsigned short    UINT16;
  31. #elif ( __INTSIZE == 4)
  32.     typedef    int        INT32;
  33.     typedef    unsigned int    UINT32;
  34.     typedef    short        INT16;
  35.     typedef    unsigned short    UINT16;
  36. #endif
  37.  
  38. #define FILE_NOT_FOUND          -10
  39. #define PATH_NOT_VALID          -11
  40. #define NO_PATH              -12
  41. #define NOT_REMOVABLE          -13
  42. #define DRIVE_OK              0
  43. #define NO_ARGUMENTS          1
  44. #define DRIVE_NOT_FLOPPY      2
  45. #define DRIVE_NOT_READY          3
  46. #define DRIVE_NOT_VALID          4
  47. #define DRIVE_ERROR          5
  48. #define WRONG_DISKETTE          6
  49. #define DRIVE_WRPROT          7
  50. #define DRIVE_WRPROT_A          8
  51. #define DRIVE_WRPROT_B          9
  52. #define DISK_ISIN_A          10
  53. #define DISK_ISIN_B          11
  54. #define NOT_REGISTERED          20
  55. #define NO_REGINFO          21
  56. #define NO_SERNUMBER          22
  57. #define FEATURES_NOT_AVAILABLE    23
  58. #define WRONG_CODE         24
  59. #define IS_REGISTERED         748
  60.  
  61. #define  WINAPI _far _pascal
  62.  
  63. #if __cplusplus
  64. extern "C" {
  65. #endif
  66.     /* cpMakeRegCode should be commented out when using cprot20u.dll */
  67.     INT16 WINAPI cpMakeRegCode( INT16 features, char * serialnum, char * regcode );
  68.  
  69.     INT16 WINAPI cpCFGMake( char * path, UINT32 magic, UINT32 filever );
  70.     INT16 WINAPI cpGetSernum( char* path, char * serialnum );
  71.     INT16 WINAPI cpRegisterProgram( char * path, char * regcode );
  72.     INT16 WINAPI cpCheckRegCode( char * path, char * regcode );
  73.     INT16 WINAPI cpGetRegisteredName( char* path, char * namn );
  74.     INT16 WINAPI cpGetRegisteredCompany( char * path, char * namn);
  75.     INT16 WINAPI cpSetRegisteredNames( char * path, char * namn, char * firma );
  76.     INT16 WINAPI cpIsRegistered( char * path );
  77.     INT16 WINAPI cpGetUParams( char* path, UINT32 *paraml, INT16 *param1, INT16 *param2, INT16 *param3, INT16 *param4, UINT16 *param5 );
  78.     INT16 WINAPI cpSetUParams( char* path, UINT32 paraml, INT16 param1, INT16 param2, INT16 param3, INT16 param4, UINT16 param5 );
  79.     INT16 WINAPI cpSetFTime( char * path, UINT32 datum, UINT16 tid );
  80.     INT16 WINAPI cpWhichDrive( char * fil );
  81.     INT16 WINAPI cpDirRemove( char * path );
  82.     INT16 WINAPI cpStartProgram( char * path );
  83.     INT16 WINAPI cpEndProgram( char * path );
  84.     INT16 WINAPI cpGetUStatistics( char * path, UINT16 * antggr, UINT16 *stim, UINT16 *smin, UINT16 *ssek, UINT16 *atim, UINT16 *amin, UINT16 *asek );
  85.     INT32 WINAPI cpGetFileinfo( char * path, INT32 * version );
  86.  
  87. #if __cplusplus
  88. }
  89. #endif
  90. #endif    /* _CPROTECT_ */
  91.